#include<stdlib.h>
#include<stdio.h>
int main ()
{
struct patient{
char nom[30];
char prenom[30];
int age;
char etat[30];
};
typedef struct patient patient ;


patient tab_patient[10];
patient P;
char chemin[]=("/home/dhia/esprit-2014-ebola-hackers/fpatient.txt");
FILE *fpatient;
fpatient=fopen(chemin,"r");
if(!fpatient)
{
printf("erreur");
}
else
{
 int i=0;
while ((fscanf(fpatient,"%s %s %d %s",P.nom,P.prenom,&P.age,P.etat) != EOF) && i<10)
{

tab_patient[i]=P;
i++;
}
fclose(fpatient);}
return 0 ;
}

